<template>
  <view class="fixbar" :style="!fixed ? 'position: relative;padding-bottom: 0;' : 'position: fixed'">
    <view class="lay">
      <slot></slot>
    </view>
  </view>
</template>

<script setup lang="ts">
const props = defineProps({
  fixed: {
    type: Boolean, default: true,
  }
})
</script>

<style lang="scss" scoped>
.fixbar {
  padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
  padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
  border-radius: 16rpx;
  width: 100%;
  bottom: 0;
  left: 0;
  .lay {
      margin: 24rpx 24rpx 0;

  }
}
</style>
